﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using TerminationCall.Editor.Logic;

namespace TerminationCall.Editor.GUI
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            
            EditorTool _editorTool = new EditorTool();
            PaintToolSet _paintToolSet = _editorTool.PaintToolSet;
            
            TilesForm tilesForm = new TilesForm(_editorTool);
            LevelForm levelForm = new LevelForm(_editorTool, _paintToolSet);
            ToolsetForm toolsetForm = new ToolsetForm(_paintToolSet);
            MainForm mainForm = new MainForm();

            toolsetForm.ShowInTaskbar = false;
            tilesForm.ShowInTaskbar = false;
            levelForm.ShowInTaskbar = false;

            tilesForm.Show();
            tilesForm.Left = 0;

            levelForm.Show();

            toolsetForm.Show();
            toolsetForm.Left = levelForm.Right + 10;

            mainForm.TilesForm = tilesForm;
            mainForm.LevelForm = levelForm;
            mainForm.ToolsetForm = toolsetForm;

            mainForm.AddOwnedForm(tilesForm);
            mainForm.AddOwnedForm(levelForm);
            mainForm.AddOwnedForm(toolsetForm);

            Application.Run(mainForm);
        }
    }
}
